﻿// -----------------------------------------------------------------------
// <copyright file="Task.cs" company="DarkBone">
// DarkBone
// </copyright>
// -----------------------------------------------------------------------

namespace DarkBone.Engine.Tasks
{
   using System;

   /// <summary>
   /// Tasks to proceed
   /// </summary>
   [Serializable]
   public class Task
   {
      /// <summary>
      /// True if task succeded
      /// </summary>
      private bool result;

      /// <summary>
      /// Task identifier
      /// </summary>
      private ID id;

      /// <summary>
      /// Task identifier
      /// </summary>
      public enum ID
      {
         /// <summary>
         /// Writes Process Memory
         /// </summary>
         WriteMemory,

         /// <summary>
         /// Read Process Memory String
         /// </summary>
         ReadMemoryString,

         /// <summary>
         /// Read Process Memory
         /// </summary>
         ReadMemory,

         /// <summary>
         /// Get Process
         /// </summary>
         GetProcess,

         /// <summary>
         /// Get opened files
         /// </summary>
         GetOpenedFiles,

         /// <summary>
         /// Opens MPQ
         /// </summary>
         OpenMPQ
      }

      /// <summary>
      /// Gets or sets Id.
      /// </summary>
      public ID Id
      {
         get
         {
            return this.id;
         }

         set
         {
            this.id = value;
         }
      }

      /// <summary>
      /// Gets or sets a value indicating whether task succeeded
      /// </summary>
      public bool Result
      {
         get
         {
            return this.result;
         }

         set
         {
            this.result = value;
         }
      }
   }
}
